<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!doctype html>
<html lang="zh-CN">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="aa" uri="/WEB-INF/tld/ajaxanywhere.tld" %>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>jsp</title>
    <script src="/webjars/jquery/3.5.1/jquery.js"></script>
    <script src="/aa.js"></script>
</head>
<body>
<label>请输入名称：</label><input id="code-name" type="text"/>
<button onclick="updateParent()">确定</button>
</body>
<script type="text/javascript">
    function updateParent() {
        //获取name
        const name = $("#code-name").val();
        //获取父窗口元素
        window.opener.addAreaSubmit(name)
        window.opener.closeDialog()
    }


</script>

</html>
